<%@ page import="com.luojiaoj.User" %>



<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'username', 'error')} required">
	<label for="username">
		<g:message code="user.username.label" default="Username" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="username" required="" value="${userInstance?.username}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'password', 'error')} required">
	<label for="password">
		<g:message code="user.password.label" default="Password" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="password" required="" value="${userInstance?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'email', 'error')} required">
	<label for="email">
		<g:message code="user.email.label" default="Email" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="email" name="email" required="" value="${userInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'province', 'error')} ">
	<label for="province">
		<g:message code="user.province.label" default="Province" />
		
	</label>
	<g:select id="province" name="province.id" from="${com.luojiaoj.location.Province.list()}" optionKey="id" value="${userInstance?.province?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'city', 'error')} ">
	<label for="city">
		<g:message code="user.city.label" default="City" />
		
	</label>
	<g:select id="city" name="city.id" from="${com.luojiaoj.location.City.list()}" optionKey="id" value="${userInstance?.city?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'school', 'error')} ">
	<label for="school">
		<g:message code="user.school.label" default="School" />
		
	</label>
	<g:select id="school" name="school.id" from="${com.luojiaoj.location.School.list()}" optionKey="id" value="${userInstance?.school?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'nickname', 'error')} ">
	<label for="nickname">
		<g:message code="user.nickname.label" default="Nickname" />
		
	</label>
	<g:textField name="nickname" maxlength="16" value="${userInstance?.nickname}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'motto', 'error')} ">
	<label for="motto">
		<g:message code="user.motto.label" default="Motto" />
		
	</label>
	<g:textArea name="motto" cols="40" rows="5" maxlength="255" value="${userInstance?.motto}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'birthday', 'error')} ">
	<label for="birthday">
		<g:message code="user.birthday.label" default="Birthday" />
		
	</label>
	<g:datePicker name="birthday" precision="day"  value="${userInstance?.birthday}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'languageType', 'error')} ">
	<label for="languageType">
		<g:message code="user.languageType.label" default="Language Type" />
		
	</label>
	<g:select id="languageType" name="languageType.id" from="${com.luojiaoj.type.LanguageType.list()}" optionKey="id" value="${userInstance?.languageType?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'accountExpired', 'error')} ">
	<label for="accountExpired">
		<g:message code="user.accountExpired.label" default="Account Expired" />
		
	</label>
	<g:checkBox name="accountExpired" value="${userInstance?.accountExpired}" />
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'accountLocked', 'error')} ">
	<label for="accountLocked">
		<g:message code="user.accountLocked.label" default="Account Locked" />
		
	</label>
	<g:checkBox name="accountLocked" value="${userInstance?.accountLocked}" />
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'enabled', 'error')} ">
	<label for="enabled">
		<g:message code="user.enabled.label" default="Enabled" />
		
	</label>
	<g:checkBox name="enabled" value="${userInstance?.enabled}" />
</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'passwordExpired', 'error')} ">
	<label for="passwordExpired">
		<g:message code="user.passwordExpired.label" default="Password Expired" />
		
	</label>
	<g:checkBox name="passwordExpired" value="${userInstance?.passwordExpired}" />
</div>

